package com.elangzhi.ssm.model;

import com.elangzhi.ssm.model.base.BaseModel;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

public class Shop extends Account {

    private Long id;

    private String name;

    private String intro;

    /**
     * 省份 中文
     */
    private String province;

    /**
     * 城市 中文
     */
    private String city;

    /**
     * 区县 中文
     */
    private String district;

    /**
     * 地址 中文
     */
    private String address;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 添加时间
     */
    private Date setTime;

    /**
     * 店铺图标
     */
    private String icon;

    /**
     * vip等级
     */
    private String vip;

    /**
     * 状态 1，正常，0，未审核
     */
    private Integer status;

    //自定义
    private User user;
    private List<Goods> goodsList;
    private List<Image> bannerList;
    private List<ShopEvent> eventList;
    private List<Advice> adviceList;

    public Shop(Long id, String name, String intro, String province, String city, String district, String address, Long userId, Date setTime, String icon, String vip, Integer status) {
        this.id = id;
        this.name = name;
        this.intro = intro;
        this.province = province;
        this.city = city;
        this.district = district;
        this.address = address;
        this.userId = userId;
        this.setTime = setTime;
        this.icon = icon;
        this.vip = vip;
        this.status = status;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<Advice> getAdviceList() {
        return adviceList;
    }

    public void setAdviceList(List<Advice> adviceList) {
        this.adviceList = adviceList;
    }

    public List<ShopEvent> getEventList() {
        return eventList;
    }

    public void setEventList(List<ShopEvent> eventList) {
        this.eventList = eventList;
    }

    public List<Image> getBannerList() {
        return bannerList;
    }

    public void setBannerList(List<Image> bannerList) {
        this.bannerList = bannerList;
    }

    public List<Goods> getGoodsList() {
        return goodsList;
    }

    public void setGoodsList(List<Goods> goodsList) {
        this.goodsList = goodsList;
    }

    public Shop() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Date getSetTime() {
        return setTime;
    }


    public String getSetTime(String pattern) {
        if(setTime == null){ return ""; }
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
        return simpleDateFormat.format(setTime);
    }

    public void setSetTime(Date setTime) {
        this.setTime = setTime;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getVip() {
        return vip;
    }

    public void setVip(String vip) {
        this.vip = vip;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}